package com.hui.dbmigrator.handler;

import com.hui.dbmigrator.config.DatabaseConfig;
import com.hui.dbmigrator.entity.DatabaseInfo;
import com.hui.dbmigrator.entity.TableDefinition;

import java.sql.SQLException;
import java.util.List;

// DatabaseHandler.java
public interface DatabaseHandler {

    String getDatabaseType();

    String generateCreateTable(TableDefinition table);

    String generateAlterTable(String tableName, List<String> alterStatements);

    TableDefinition extractTable(String tableName, DatabaseConfig config) throws SQLException;

    List<String> getTableNames(DatabaseConfig config) throws SQLException;

    void execute(DatabaseConfig config, String sql) throws SQLException;
}


